#ifndef __UTILS__LOAD_POINT__
#define __UTILS__LOAD_POINT__

#include "../include/Point.hpp"
#include <fstream>

std::vector<Point> load_point()
{
    std::vector<Point> pnts;
    std::ifstream fin("../data/domain.n");
    std::cerr << "reading data from domain.n" << std::endl;
    unsigned int num_point;
    fin >> num_point;
    std::cerr << "domain.n has " << num_point << " points in total" << std::endl;
    char trash[100];
    double x, y;
    bool marker;
    for(unsigned int i=0; i<num_point; i++)
    {
        fin >> trash >> x >> y >> marker;
        Point p(i, {x,y}, marker);
        pnts.push_back(p);
    }
    std::cerr << "finish reading points data" << std::endl;
    return pnts;
}

#endif
